﻿jQuery.validator.addMethod("isMobile", function(value, element) {
    var length = value.length;
    var mobile = /^(13[0-9]{9})|(18[0-9]{9})|(14[0-9]{9})|(17[0-9]{9})|(15[0-9]{9})$/;
    return this.optional(element) || (length == 11 && mobile.test(value));
}, "请正确填写您的手机号码");
jQuery.validator.addMethod("checkeng", function(value, element) {
    var reg =  /^[0-9a-zA-Z]+$/;
    return this.optional(element) || reg.test(value);
}, "只能输入数字或字母！");